package shiyan3;

import javax.swing.*;
import java.awt.*;

public class Test3 extends JFrame {
    public Test3(){
        setTitle("学生管理系统");
        setLayout(null);
        Container c = getContentPane();
        JLabel xh = new JLabel("学号");
        xh.setBounds(20,20,90,30);
        c.add(xh);
        final JTextField xhf = new JTextField();
        xhf.setBounds(60,20,130,30);
        c.add(xhf);

        JLabel xm = new JLabel("姓名");
        xm.setBounds(20,60,90,30);
        c.add(xm);
        final JTextField xmf = new JTextField();
        xmf.setBounds(60,60,130,30);
        c.add(xmf);

        JLabel sy = new JLabel("索引");
        sy.setBounds(240,140,90,30);
        c.add(sy);
        final JTextField syf = new JTextField();
        syf.setBounds(280,140,130,30);
        c.add(syf);

        final JTextField result = new JTextField();
        result.setBounds(20,180,460,180);
        c.add(result);

        JLabel xb = new JLabel("性别");
        xb.setBounds(20,100,90,30);
        c.add(xb);
        JRadioButton n = new JRadioButton("男");
        n.setBounds(60,100,50,30);
        c.add(n);
        JRadioButton l = new JRadioButton("女");
        l.setBounds(120,100,50,30);
        c.add(l);

        JLabel ah = new JLabel("爱好");
        ah.setBounds(20,140,90,30);
        c.add(ah);
        JCheckBox music = new JCheckBox("音乐");
        music.setBounds(60,140,80,30);
        c.add(music);
        JCheckBox reader = new JCheckBox("阅读");
        reader.setBounds(140,140,80,30);
        c.add(reader);

        JButton jb1 = new JButton("添加到末尾");
        jb1.setBounds(240,20,90,30);
        c.add(jb1);
        JButton jb2 = new JButton("插入到");
        jb2.setBounds(350,20,90,30);
        c.add(jb2);
        JButton jb3 = new JButton("更新");
        jb3.setBounds(240,60,90,30);
        c.add(jb3);
        JButton jb4 = new JButton("删除");
        jb4.setBounds(350,60,90,30);
        c.add(jb4);
        JButton jb5 = new JButton("查找");
        jb5.setBounds(240,100,90,30);
        c.add(jb5);
        setSize(520,430);
        setVisible(true);
        setResizable(true);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }
    public static void main(String[] args) {
        new Test3();
    }
}